Feat: Add RFC 7523 (JWT Bearer Grant) support#875
Feat: Add RFC 7523 (JWT Bearer Grant) support#875ZachGerman wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
7092743 to
1094286
Compare
4d5cad5 to
c598a2f
Compare
0845a57 to
c94ba4b
Compare
|
@pcarleton @felixweinberger Any review possible for this some time soon? |
|
Considering the recent change (the spec is now part of ext-auth). We took the approach to have this in mcp.client.auth.extensions.client_credentials in the python SDK to highligh the "extension". I think this might be wise to find a similar way for typescript sdk |
|
Hey @ZachGerman - sorry this sat without review! We're triaging old PRs. Question for @pcarleton: does this need an ext-auth spec first like client credentials did with SEP-1046? |
|
@felixweinberger JWT assertion on the Adding JWT bearer grant is quite easily achieved following the same pattern (if started from |
Adds support for JWT Credentials passed to the OAuthClientProvider.
Also added a JWT OAuth client in the examples directory.
Motivation and Context
This provides support for machine-to-machine auth.
How Has This Been Tested?
Tested E2E via Auth0.
Breaking Changes
codeVerifierfor token exchange, but I'm pretty sure it's desirable behavior since PKCE is required per MCP spec.Types of changes
Checklist
Additional context
Draft until tested end-to-end.Tested E2E via Auth0.Bloated jwt-utils, as I was oiriginally going to add it to the built-in AS, but did a 180. Leaving it as-is in case someone wants to add built-in AS support for JWT.